package com.sunyifeng.ch03;

public class Singleton2ThreadSafety {
    private static Singleton2ThreadSafety instance;

    private Singleton2ThreadSafety() {
    }

    public static synchronized Singleton2ThreadSafety getInstance() {
        if (instance == null) {
            instance = new Singleton2ThreadSafety();
        }
        return instance;
    }
}
